package com.graph;


/**
 * code_repository_delta
 *@author huliangjun
 *@date 2018/11/29 10:04
 */

public class JumpPoint {

    private Double pixelPosX;

    private Double pixelPosY;
    /** 跳跃方向，1 左，2 右*/
    private Integer direct;

    public JumpPoint(){

    }

    public JumpPoint(Double pixelPosX, Double pixelPosY,Integer direct) {
        this.pixelPosX = pixelPosX;
        this.pixelPosY = pixelPosY;
        this.direct = direct;
    }


    @Override
    public boolean equals(Object other) {
        if (!(other instanceof JumpPoint)) {
            return false;
        }
        JumpPoint o = (JumpPoint)other;
        return this.pixelPosX.equals(o.pixelPosX) &&  this.pixelPosY.equals(o.pixelPosY);
    }

    @Override
    public int hashCode()
    {
        return this.pixelPosX.hashCode() * this.pixelPosY.hashCode();
    }

    public Double getPixelPosX() {
        return pixelPosX;
    }

    public void setPixelPosX(Double pixelPosX) {
        this.pixelPosX = pixelPosX;
    }

    public Double getPixelPosY() {
        return pixelPosY;
    }

    public void setPixelPosY(Double pixelPosY) {
        this.pixelPosY = pixelPosY;
    }

    public Integer getDirect() {
        return direct;
    }

    public void setDirect(Integer direct) {
        this.direct = direct;
    }
}
